﻿using System;
using System.Collections.Generic;
using System.Linq;
using Model.User;
using Model.Course;

namespace Controller
{
    public static class AdministrationController
    {


        public static Person register(string fname, string lname, string email, string password)        
        {
            var p = Person.create(fname, lname, password, email, null);

            return p;
        }

        public static void registerTeacher(string fname, string lname, string email, string password)        
        {
            
        }
        public static void unregisterTeacher(int teacherId)        
        {
            
        }
        public static void deleteCourse(object course)        
        {
            
        }

        public static Person login(string email, string password)
        {
            var p = Person.get(email);

            if (p != null && !p.getPassword().Equals(password))
                return null;

            return p;
        }
    }
}